package com.peas.platform.module.icims.expenditure.kpis.adapter.repository.po;

import java.util.*;
import java.math.*;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.peas.platform.common.core.annotation.Comment;
import com.peas.platform.framework.mybatisplus.po.BasePo;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.ibatis.type.JdbcType;
import javax.validation.constraints.*;

// 指标单
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`tbl_expenditure_kpi`")
public class ExpenditureKpiPo extends BasePo {

    // 指标编码
    // 自动生成
    @Comment(value = "指标编码")
    @Size(max = 100, message = "指标编码不能超过100个字符")
    @TableField(value = "`kpi_code`", jdbcType = JdbcType.VARCHAR)
    private String kpiCode;

    // 指标名称
    @Comment(value = "指标名称")
    @Size(max = 200, message = "指标名称不能超过200个字符")
    @TableField(value = "`kpi_name`", jdbcType = JdbcType.VARCHAR)
    private String kpiName;

    // 单据日期
    @Comment(value = "单据日期")
    @TableField(value = "`kpi_date`", jdbcType = JdbcType.TIMESTAMP)
    private Date kpiDate;

    // 预算年度
    @Comment(value = "预算年度")
    @Size(max = 4, message = "预算年度不能超过4个字符")
    @TableField(value = "`year`", jdbcType = JdbcType.VARCHAR)
    private String year;

    // 支出类型
    // 字典取值:ExpenditureKpiPayType
    @Comment(value = "支出类型", dictType = "ExpenditureKpiPayType")
    @Size(max = 20, message = "支出类型不能超过20个字符")
    @TableField(value = "`pay_type`", jdbcType = JdbcType.VARCHAR)
    private String payType;

    // 经费类型
    // 字典取值:ExpenditureKpiFundType
    @Comment(value = "经费类型", dictType = "ExpenditureKpiFundType")
    @Size(max = 20, message = "经费类型不能超过20个字符")
    @TableField(value = "`fund_type`", jdbcType = JdbcType.VARCHAR)
    private String fundType;

    // 预算总金额
    @Comment(value = "预算总金额")
    @TableField(value = "`amount`", jdbcType = JdbcType.DECIMAL)
    private BigDecimal amount;

    // 组织架构(部门)ID
    // （组织架构表）外键
    @Comment(value = "组织架构(部门)ID")
    @TableField(value = "`organization_id`", jdbcType = JdbcType.BIGINT)
    private Long organizationId;

    // 项目负责人用户ID
    // （用户表）外键
    @Comment(value = "项目负责人用户ID")
    @TableField(value = "`manager_id`", jdbcType = JdbcType.BIGINT)
    private Long managerId;

    // 项目类型ID
    // （项目类型表）多级外键
    @Comment(value = "项目类型ID")
    @Size(max = 200, message = "项目类型ID不能超过200个字符")
    @TableField(value = "`expenditure_ptype_id`", jdbcType = JdbcType.VARCHAR)
    private String expenditurePtypeId;

    // 功能分类ID
    // （功能分类表）多级外键
    @Comment(value = "功能分类ID")
    @Size(max = 200, message = "功能分类ID不能超过200个字符")
    @TableField(value = "`expenditure_functional_id`", jdbcType = JdbcType.VARCHAR)
    private String expenditureFunctionalId;

    // 财政项目ID
    // （财政项目表）多级外键
    @Comment(value = "财政项目ID")
    @Size(max = 200, message = "财政项目ID不能超过200个字符")
    @TableField(value = "`expenditure_fiscal_id`", jdbcType = JdbcType.VARCHAR)
    private String expenditureFiscalId;

    // 指标来源
    // 字典取值:ExpenditureKpiSource
    @Comment(value = "指标来源", dictType = "ExpenditureKpiSource")
    @Size(max = 20, message = "指标来源不能超过20个字符")
    @TableField(value = "`source`", jdbcType = JdbcType.VARCHAR)
    private String source;

    // 状态
    // 枚举取值:ExpenditureKpiState
    @Comment(value = "状态", enumType = "ExpenditureKpiState")
    @Size(max = 20, message = "状态不能超过20个字符")
    @TableField(value = "`state`", jdbcType = JdbcType.VARCHAR)
    private String state;

    // 是否按经济分类控制金额
    // 枚举取值:CommonYesNo
    @Comment(value = "是否按经济分类控制金额", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否按经济分类控制金额不能超过20个字符")
    @TableField(value = "`is_economic`", jdbcType = JdbcType.VARCHAR)
    private String isEconomic;

    // 是否开启业务
    // 枚举取值:CommonYesNo
    @Comment(value = "是否开启业务", enumType = "CommonYesNo")
    @Size(max = 20, message = "是否开启业务不能超过20个字符")
    @TableField(value = "`is_begin`", jdbcType = JdbcType.VARCHAR)
    private String isBegin;

}
